/*
 *  修改数组， 省赛A组c++， 并查集优化时间
 * */

#include <iostream>
#include <vector>
using namespace std;

const int N = 1e6 + 10;

vector<int> f(N);

int get(int x) {
    return f[x] = f[x] == x ? x : get(f[x]);
}

int main() {
    int n;
    cin >> n;

    vector<int> res(n + 1);
    // 初始化并查集
    for (int i = 1; i <= N; ++i) {
        f[i] = i;
    }

    for (int i = 1; i <= n; ++i) {
        cin >> res[i];
        res[i] = get(res[i]);
        // 把它归到下一个元素中
        f[res[i]] = get(res[i] + 1);
    }

    for (int i = 1; i <= n; ++i) {
        cout << res[i] << " ";
    }

    return 0;
}
